/*
 * Amazon Ads API - Sponsored Products
 * Use the Amazon Ads API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the [Sponsored Products Support Center](https://advertising.amazon.com/help?entityId=ENTITY3CWETCZD9HEG2#GWGFKPEWVWG2CLUJ). For onboarding information, see the [account setup](setting-up/account-setup) topic.<br/><br/> 
 *
 * The version of the OpenAPI document: 2.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import org.openapitools.client.model.MatchType;
import org.openapitools.client.model.State;

/**
 * KeywordEx
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-04-12T19:05:39.971406+08:00[Asia/Shanghai]")
public class KeywordEx {
  public static final String SERIALIZED_NAME_KEYWORD_ID = "keywordId";
  @SerializedName(SERIALIZED_NAME_KEYWORD_ID)
  private BigDecimal keywordId;

  public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId";
  @SerializedName(SERIALIZED_NAME_CAMPAIGN_ID)
  private BigDecimal campaignId;

  public static final String SERIALIZED_NAME_AD_GROUP_ID = "adGroupId";
  @SerializedName(SERIALIZED_NAME_AD_GROUP_ID)
  private BigDecimal adGroupId;

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private State state;

  public static final String SERIALIZED_NAME_KEYWORD_TEXT = "keywordText";
  @SerializedName(SERIALIZED_NAME_KEYWORD_TEXT)
  private String keywordText;

  public static final String SERIALIZED_NAME_NATIVE_LANGUAGE_KEYWORD = "nativeLanguageKeyword";
  @SerializedName(SERIALIZED_NAME_NATIVE_LANGUAGE_KEYWORD)
  private String nativeLanguageKeyword;

  public static final String SERIALIZED_NAME_MATCH_TYPE = "matchType";
  @SerializedName(SERIALIZED_NAME_MATCH_TYPE)
  private MatchType matchType;

  public static final String SERIALIZED_NAME_BID = "bid";
  @SerializedName(SERIALIZED_NAME_BID)
  private Float bid;

  public static final String SERIALIZED_NAME_CREATION_DATE = "creationDate";
  @SerializedName(SERIALIZED_NAME_CREATION_DATE)
  private BigDecimal creationDate;

  public static final String SERIALIZED_NAME_LAST_UPDATED_DATE = "lastUpdatedDate";
  @SerializedName(SERIALIZED_NAME_LAST_UPDATED_DATE)
  private BigDecimal lastUpdatedDate;

  /**
   * The serving status of the keyword. See the **computed status** section of the [developer notes](https://advertising.amazon.com/API/docs/en-us/get-started/developer-notes) for definitions.
   */
  @JsonAdapter(ServingStatusEnum.Adapter.class)
  public enum ServingStatusEnum {
    TARGETING_CLAUSE_ARCHIVED("TARGETING_CLAUSE_ARCHIVED"),
    
    TARGETING_CLAUSE_PAUSED("TARGETING_CLAUSE_PAUSED"),
    
    TARGETING_CLAUSE_STATUS_LIVE("TARGETING_CLAUSE_STATUS_LIVE"),
    
    TARGETING_CLAUSE_POLICING_SUSPENDED("TARGETING_CLAUSE_POLICING_SUSPENDED"),
    
    CAMPAIGN_OUT_OF_BUDGET("CAMPAIGN_OUT_OF_BUDGET"),
    
    AD_GROUP_PAUSED("AD_GROUP_PAUSED"),
    
    AD_GROUP_ARCHIVED("AD_GROUP_ARCHIVED"),
    
    CAMPAIGN_PAUSED("CAMPAIGN_PAUSED"),
    
    CAMPAIGN_ARCHIVED("CAMPAIGN_ARCHIVED"),
    
    ACCOUNT_OUT_OF_BUDGET("ACCOUNT_OUT_OF_BUDGET"),
    
    PENDING_START_DATE("PENDING_START_DATE");

    private String value;

    ServingStatusEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static ServingStatusEnum fromValue(String value) {
      for (ServingStatusEnum b : ServingStatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<ServingStatusEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final ServingStatusEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public ServingStatusEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return ServingStatusEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_SERVING_STATUS = "servingStatus";
  @SerializedName(SERIALIZED_NAME_SERVING_STATUS)
  private ServingStatusEnum servingStatus;


  public KeywordEx keywordId(BigDecimal keywordId) {
    
    this.keywordId = keywordId;
    return this;
  }

   /**
   * The identifier of the keyword.
   * @return keywordId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the keyword.")

  public BigDecimal getKeywordId() {
    return keywordId;
  }


  public void setKeywordId(BigDecimal keywordId) {
    this.keywordId = keywordId;
  }


  public KeywordEx campaignId(BigDecimal campaignId) {
    
    this.campaignId = campaignId;
    return this;
  }

   /**
   * The identifer of the campaign to which the keyword is associated.
   * @return campaignId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifer of the campaign to which the keyword is associated.")

  public BigDecimal getCampaignId() {
    return campaignId;
  }


  public void setCampaignId(BigDecimal campaignId) {
    this.campaignId = campaignId;
  }


  public KeywordEx adGroupId(BigDecimal adGroupId) {
    
    this.adGroupId = adGroupId;
    return this;
  }

   /**
   * The identifier of the ad group to which this keyword is associated.
   * @return adGroupId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the ad group to which this keyword is associated.")

  public BigDecimal getAdGroupId() {
    return adGroupId;
  }


  public void setAdGroupId(BigDecimal adGroupId) {
    this.adGroupId = adGroupId;
  }


  public KeywordEx state(State state) {
    
    this.state = state;
    return this;
  }

   /**
   * Get state
   * @return state
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public State getState() {
    return state;
  }


  public void setState(State state) {
    this.state = state;
  }


  public KeywordEx keywordText(String keywordText) {
    
    this.keywordText = keywordText;
    return this;
  }

   /**
   * The text of the expression to match against a search query.
   * @return keywordText
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The text of the expression to match against a search query.")

  public String getKeywordText() {
    return keywordText;
  }


  public void setKeywordText(String keywordText) {
    this.keywordText = keywordText;
  }


  public KeywordEx nativeLanguageKeyword(String nativeLanguageKeyword) {
    
    this.nativeLanguageKeyword = nativeLanguageKeyword;
    return this;
  }

   /**
   * The unlocalized keyword text in the preferred locale of the advertiser.
   * @return nativeLanguageKeyword
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The unlocalized keyword text in the preferred locale of the advertiser.")

  public String getNativeLanguageKeyword() {
    return nativeLanguageKeyword;
  }


  public void setNativeLanguageKeyword(String nativeLanguageKeyword) {
    this.nativeLanguageKeyword = nativeLanguageKeyword;
  }


  public KeywordEx matchType(MatchType matchType) {
    
    this.matchType = matchType;
    return this;
  }

   /**
   * Get matchType
   * @return matchType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public MatchType getMatchType() {
    return matchType;
  }


  public void setMatchType(MatchType matchType) {
    this.matchType = matchType;
  }


  public KeywordEx bid(Float bid) {
    
    this.bid = bid;
    return this;
  }

   /**
   * Bid associated with this keyword. This table details the maximum allowable bid (in local currency) for keywords by marketplace: | Marketplace | Currency | Min / Max bid for SP | | --- | --- | --- | | US | USD | 0.02 / 1000 | | CA | CAD | 0.02 / 1000 | | UK | GBP | 0.02 / 1000 | | DE | EUR | 0.02 / 1000 | | FR | EUR | 0.02 / 1000 | | ES | EUR | 0.02 / 1000 | | IT | EUR | 0.02 / 1000 | | JP | JPY | 2.0 / 100000 | | AU | AUD | 0.10 / 1410 | | AE | AED | 0.24 / 184.0 |
   * minimum: 0.02
   * @return bid
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Bid associated with this keyword. This table details the maximum allowable bid (in local currency) for keywords by marketplace: | Marketplace | Currency | Min / Max bid for SP | | --- | --- | --- | | US | USD | 0.02 / 1000 | | CA | CAD | 0.02 / 1000 | | UK | GBP | 0.02 / 1000 | | DE | EUR | 0.02 / 1000 | | FR | EUR | 0.02 / 1000 | | ES | EUR | 0.02 / 1000 | | IT | EUR | 0.02 / 1000 | | JP | JPY | 2.0 / 100000 | | AU | AUD | 0.10 / 1410 | | AE | AED | 0.24 / 184.0 |")

  public Float getBid() {
    return bid;
  }


  public void setBid(Float bid) {
    this.bid = bid;
  }


  public KeywordEx creationDate(BigDecimal creationDate) {
    
    this.creationDate = creationDate;
    return this;
  }

   /**
   * Creation date in epoch time.
   * @return creationDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Creation date in epoch time.")

  public BigDecimal getCreationDate() {
    return creationDate;
  }


  public void setCreationDate(BigDecimal creationDate) {
    this.creationDate = creationDate;
  }


  public KeywordEx lastUpdatedDate(BigDecimal lastUpdatedDate) {
    
    this.lastUpdatedDate = lastUpdatedDate;
    return this;
  }

   /**
   * Date of last update in epoch time.
   * @return lastUpdatedDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Date of last update in epoch time.")

  public BigDecimal getLastUpdatedDate() {
    return lastUpdatedDate;
  }


  public void setLastUpdatedDate(BigDecimal lastUpdatedDate) {
    this.lastUpdatedDate = lastUpdatedDate;
  }


  public KeywordEx servingStatus(ServingStatusEnum servingStatus) {
    
    this.servingStatus = servingStatus;
    return this;
  }

   /**
   * The serving status of the keyword. See the **computed status** section of the [developer notes](https://advertising.amazon.com/API/docs/en-us/get-started/developer-notes) for definitions.
   * @return servingStatus
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The serving status of the keyword. See the **computed status** section of the [developer notes](https://advertising.amazon.com/API/docs/en-us/get-started/developer-notes) for definitions.")

  public ServingStatusEnum getServingStatus() {
    return servingStatus;
  }


  public void setServingStatus(ServingStatusEnum servingStatus) {
    this.servingStatus = servingStatus;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    KeywordEx keywordEx = (KeywordEx) o;
    return Objects.equals(this.keywordId, keywordEx.keywordId) &&
        Objects.equals(this.campaignId, keywordEx.campaignId) &&
        Objects.equals(this.adGroupId, keywordEx.adGroupId) &&
        Objects.equals(this.state, keywordEx.state) &&
        Objects.equals(this.keywordText, keywordEx.keywordText) &&
        Objects.equals(this.nativeLanguageKeyword, keywordEx.nativeLanguageKeyword) &&
        Objects.equals(this.matchType, keywordEx.matchType) &&
        Objects.equals(this.bid, keywordEx.bid) &&
        Objects.equals(this.creationDate, keywordEx.creationDate) &&
        Objects.equals(this.lastUpdatedDate, keywordEx.lastUpdatedDate) &&
        Objects.equals(this.servingStatus, keywordEx.servingStatus);
  }

  @Override
  public int hashCode() {
    return Objects.hash(keywordId, campaignId, adGroupId, state, keywordText, nativeLanguageKeyword, matchType, bid, creationDate, lastUpdatedDate, servingStatus);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class KeywordEx {\n");
    sb.append("    keywordId: ").append(toIndentedString(keywordId)).append("\n");
    sb.append("    campaignId: ").append(toIndentedString(campaignId)).append("\n");
    sb.append("    adGroupId: ").append(toIndentedString(adGroupId)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    keywordText: ").append(toIndentedString(keywordText)).append("\n");
    sb.append("    nativeLanguageKeyword: ").append(toIndentedString(nativeLanguageKeyword)).append("\n");
    sb.append("    matchType: ").append(toIndentedString(matchType)).append("\n");
    sb.append("    bid: ").append(toIndentedString(bid)).append("\n");
    sb.append("    creationDate: ").append(toIndentedString(creationDate)).append("\n");
    sb.append("    lastUpdatedDate: ").append(toIndentedString(lastUpdatedDate)).append("\n");
    sb.append("    servingStatus: ").append(toIndentedString(servingStatus)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

